<{include file="common/header.tpl"}>
<section id="spread_one" class="column">

        <article class="module width_3_quarter">
        <header>
            <h3 class="tabs_involved ">每日数据汇总</h3>
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
			<table class="tablesorter" cellspacing="0"> 
                            <{if $account_type != 'limit'}>
                             <header>
        <div class="">
    <span class="fw" style="font-family:'黑体'">&nbsp;</span>&nbsp;&nbsp;从&nbsp;&nbsp;<input type="text" value="<{$start_date}>" id="date1" name='start_date' /> &nbsp;至 
	&nbsp;<input type="text" value="<{$end_date}>" id="date2" name='end_date'/>&nbsp;&nbsp; 网点 : &nbsp;

	<select id="select_machine" class="spread_tab" name='select_machine'>
            <option value ='all'>全部网点</option>
	<{foreach from=$accounts item='v'}>
	    <option value ='<{$v.machine}>' <{if $v.machine==$machine_selected}>selected<{/if}> ><{$v.machine}></option>
	<{/foreach}>
	</select>&nbsp;&nbsp;&nbsp;&nbsp;
    <input class="daily-update" id ="daily-update" type='submit' value='查询'>
    
        </div>
                       
                        </header>
        <{/if}>
			<thead> 
				<tr> 
   					
    				<th>日期</th> 
    				<th>渠道</th> 
    				<th>品牌</th> 
    				<th>型号</th> 
    				<th>手机数量</th>
    				<th>明细</th> 
				</tr> 
			</thead> 
			<tbody>
				<{foreach from = $daily key="sday" item = 'day'}> 
                                <{if $day.mobiles_chn>0}>
					<tr>
						<td><{$day.day}></td>
                                                <td><{$day.nickname}></td>
						<td><{$day.brand_chn}></td>
					        <td><{$day.types_chn}></td> 
						<td><{$day.mobiles_chn}></td>
                                                <td><a href="/data/day/<{"-"|@str_replace:"":$day.day}>/<{$day.uid}>">明细</a></td>
					</tr> 
                                <{/if}>
				<{/foreach}>
			</tbody> 
			</table>
			</div><!-- end of #tab1 -->
                        
		</div><!-- end of .tab_container -->
                <div><{$pagination}></div>
		</article><!-- end of content manager article -->
		<div class="clear"></div>
                
	</section>	
<script>
        $('#daily-update').click(function() {
        var start_date = $('#date1').val();
        var end_date   = $('#date2').val();
        var machine    = $('#select_machine').val();
        window.location.href ="/data/daily?start_date="+ start_date + "&end_date=" + end_date + "&machine=" + machine;
        });
</script>
<{include file="common/footer.tpl"}>
